/*
 *  WaveFunctionFactory.h
 *  SoundController0002
 *
 *  Created by jiro on 10/11/12.
 *  Copyright 2010 jiro music. All rights reserved.
 *
 */

#pragma once

#include "AllWaveFunction.h"
#include "Line.h"
#include <vector>

namespace sc
{
	class WaveFunctionFactory {
	private:

		static std::vector< const WaveFunction* > waveFunctions;

	public:

		static const WaveFunction& CreateXSinX( double powerOfX, double cycle, bool isReverse = false );

		static const WaveFunction& CreateLogXSinX( double powerOfXOfLog, double cycle, bool isReverse = false );
		
		static const WaveFunction& CreateSinXVariableCycle( Line::Type cycleVaryLineType, double startCycle, double endCycle, double xAtStartCycle, double xAtEndCycle );

		static const WaveFunction& CreateSinPowerOfX( double powerOfX, double cycle );

		static bool IsExist( const WaveFunction& function );

		static const WaveFunction* Get( const WaveFunction& function );

	};
}
